// 字符串
let str: string = '我是字符串类型'
let modelStr: string = `模办字符串: ${str}`

// 数值
let num:number = 123

// 布尔类型
let status: boolean = false

// 数组
let arr:string[] = ['字符串1', '字符串2']
let arr2:Array<number> = [1, 2, 3]

// 元祖
let yuanZu:[string, number, Boolean]
yuanZu = ['111', 111, false]

// 枚举
enum addData {
    msg = '我的宝是',
    name = '馨儿',
    age = 24,
    sex = '女',
    en =  'I love You'
}
let name:addData = addData.name
let sex:addData = addData.sex
let age:addData = addData.age
console.log(
    addData.msg + name + '今年' + age + ' --- (๑*◡*๑) --- ' + addData.en
)

// 任意类型
let abs:any
abs = 1
abs = '2'
let absArr:Array<any> = ['2', 2, false]

// 空类型
// 严格模式关闭
let nullType:void = null
console.log(nullType)

function fn():void {
    console.log('空类型！')
}

// never
function fn1(a:number, b:number):never {
    while(true) {
        console.log(a + b)
    }
}

// 对象类型，非原始类型
let arrType:object = [1, false, '2']

// 联合类型,一个值有多个类型
let Baby:string | number
Baby = '222';
// 断言
(<string>Baby).length

































































































// 不使用全局模式
export {}